var treetemplatepath = 'https://gitee.com/grassprogramming/FastTree-Vue/fasttree-template.html';
Vue.component('fasttree', function (resolve, reject) {
    $.get(treetemplatepath).then(function (res) {
        resolve({
            template: res,
            //selectmodal  1：single单选 2：multi多选 默认单选
            props: {
                itemData: {
                    required: true
                },
                selectmodal: {
                    default: 'single'
                },
                depth: {

                },

            },
            data() {
                return {
                    showchild: false
                }
            },
            computed: {
                indent() {
                    return {
                        transform: `translate(${this.depth * 15}px)`
                    }
                }

            },
            methods: {
                togglechild() {
                    this.showchild = !this.showchild;
                },
                menuitemclick(row) {
                    this.$emit('menuitemclick', row)
                }
            }
        })
    });
});
